import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import AddUser from './views/system-management/AddUser.vue'
import CheckAccount from './views/system-management/CheckAccount.vue'
import EditAccount from './views/system-management/EditAccount.vue'
import supplierAllBack from './views/supplierAllBack.vue'
import SearchAccount from './views/system-management/SearchAccount.vue'
import PlantShow from './views/plant-management/PlantShow.vue'
import PlantDetails from './views/plant-management/PlantDetails.vue'
import FileDownload from './views/file-management/FileDownload.vue'
import FileDelect from './views/file-management/FileDelect.vue'
import FileUpload from './views/file-management/FileUpload.vue'
import Daily from './views/userdaily/Daily.vue'
import RTA from './views/rta/RTA.vue'
import DataStatistics from './views/statistics/DataStatistics.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    // { path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '实时监控',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/rta/:id', component: RTA, name: '在线监测'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据分析',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/statistics', component: DataStatistics, name: '数据分析'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/adduser', component: AddUser, name: '添加员工' },
            { path: '/checkaccount', component: CheckAccount, name: '查看账号' },
            { path: '/editaccount', component: EditAccount, name: '修改账号' },
            { path: '/searchaccount', component: SearchAccount, name: '搜索用户' },
            { path: '/supplierallback', component: supplierAllBack, hidden:true}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '厂房管理',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/plantshow', component: PlantShow, name: '厂房展示' },
            { path: '/plantdetail/:id', component: PlantDetails, name: '厂房详情' ,hidden:true},
            { path: '/editaccount', component: EditAccount, name: '修改账号' },
            { path: '/searchaccount', component: SearchAccount, name: '搜索用户' },
            { path: '/supplierallback', component: supplierAllBack, hidden:true}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '文件管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/filedownload', component: FileDownload, name: '下载文件'},
            { path: '/filedelect', component: FileDelect, name: '删除文件'},
            { path: '/fileupload', component: FileUpload, name: '上传文件'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '日志查看',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/daily', component: Daily, name: '用户日志'}
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;